<?php

namespace app\index\controller;

use app\BaseController;

class Index
{

    public function index()

    {
        $path = 'D:\跑跑卡丁车\NPS.dll';
        if (empty(strrpos($path, '.'))) {
            echo '路径不合法';
            die();
        }
        echo '文件：' . $path . '<br>';
        echo '后缀名:' . substr($path, strrpos($path, '.') + 1, strlen($path));
    }

}
